function cli() {
    var index = document.getElementById('index');

}

function a() {

    document.getElementById('onck').style.cssText = `visibility:visible;transition: 1s;opacity: 1;height:${document.body.scrollHeight}px;`;
    // document.getElementsByTagName('body')[0].style.cssText = `transform:1s;opactiy:1;z-index: 1000;`


}

function a1() {

    document.getElementById('onck1').style.cssText = `display:block;height:${document.body.scrollHeight}px;`;
    // document.getElementsByTagName('body')[0].style.cssText = `transform:1s;opactiy:1;z-index: 1000;`
    var list = document.getElementById('city').getElementsByTagName('li');
    for (var i = 0; i < list.length; i++) {
        list[i].onclick = function() {
            document.getElementById('a1').value = this.innerHTML;
            b1();
        }
    }


}

var next = function() {
    var a = document.getElementById("biao1").getElementsByTagName('input');
    var z = document.getElementById('biao1').getElementsByTagName('span')
    for (var i = 0; i < a.length; i++) {
        if (a[i].value == '') {
            if (a[1].value == '' || a[0].value == '') {
                document.getElementById('tishi').style.cssText = 'visibility:visible;transition:.3s;opacity: 1; transform:scale(2,2)';
                document.getElementById('tishi').getElementsByTagName('div')[0].innerHTML = `请填写${z[i].innerHTML}`;
            } else if (a[2].value == '') {
                document.getElementById('tishi').style.cssText = 'visibility:visible;transition:.3s;opacity: 1; transform:scale(2,2)';
                document.getElementById('tishi').getElementsByTagName('div')[0].innerHTML = `请选择城市`;
            } else if (a[3].value == '') {
                document.getElementById('tishi').style.cssText = 'visibility:visible;transition:.3s;opacity: 1; transform:scale(2,2)';
                document.getElementById('tishi').getElementsByTagName('div')[0].innerHTML = `请选择小区名`;
            } else if (a[4].value == '') {
                document.getElementById('tishi').style.cssText = 'visibility:visible;transition:.3s;opacity: 1; transform:scale(2,2)';
                document.getElementById('tishi').getElementsByTagName('div')[0].innerHTML = `请填写门牌号`;
            }


            setTimeout(() => {
                document.getElementById('tishi').style.cssText = 'visibility:hidden;transition:.2s;opacity:0; transform:scale(2,2)';

            }, 3000);

            setTimeout(() => {
                document.getElementById('tishi').style.cssText = 'visibility:hidden;transform:scale(1,1)';


            }, 3500)

            return
        }
    }

    document.getElementById('biao1').style.cssText = 'display:none';
    var a = document.getElementById('xinxi').getElementsByTagName('div');
    var div = document.getElementById('xinxi').getElementsByTagName('div');
    div[1].style.cssText = 'border-bottom: 1px solid red;color:red';
    div[0].style.cssText = 'border-bottom: 0;color:black';
    if (document.getElementById('zheng').style.cssText == 'cursor: pointer;') {
        document.getElementById('leixing').value = '合租'
        document.getElementById('biao2').style.cssText = 'display:block';
    } else {
        document.getElementById('leixing3').value = '整租'
        document.getElementById('biao3').style.cssText = 'display:block';
    }
}
var next1 = function() {
    document.getElementById('biao1').style.cssText = 'display:block';
    document.getElementById('biao2').style.cssText = 'display:none';
    var div = document.getElementById('xinxi').getElementsByTagName('div');
    div[0].style.cssText = 'border-bottom: 1px solid red;color:red';
    div[1].style.cssText = 'border-bottom: 0;color:black';
}
var zheng = function() {
    document.getElementById('zheng').style.cssText = `border:1px solid red;cursor: pointer;`;
    document.getElementById('he').style.cssText = `cursor: pointer;`;
}

var he = function() {
    document.getElementById('zheng').style.cssText = `cursor: pointer;background-image: url('');`;
    document.getElementById('he').style.cssText = `border:1px solid red;cursor: pointer;background-image: url('../img/selected.png');
    background-repeat: no-repeat;
    background-position: 72px 18px;`;
}

function b() {
    document.getElementById('onck').style.cssText = 'visibility:hidden';
}

function b1() {
    document.getElementById('onck1').style.cssText = 'display:none';
}

function search() {
    // document.getElementById('search').style.cssText = `box-sizing: border-box; border:2px solid black`;
    console.log(document.body.clientWidth, document.body.scrollHeight)
}